package com.fanbuchi.app.ins.vo;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by rabbit on 2016/3/16.
 */
public class HotPoint implements Parcelable {

    public String tags;
    public long uid;
    public String province;
    public long geotable_id;
    public String district;
    public long modify_time;
    public String create_time;
    public String city;
    public String address;
    public String title;
    public int coord_type;
    public String direction;
    public int type;
    public double distance;
    public double weight;
    public double[] location;

    //myself
    public String links;



    public HotPoint() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.tags);
        dest.writeLong(this.uid);
        dest.writeString(this.province);
        dest.writeLong(this.geotable_id);
        dest.writeString(this.district);
        dest.writeLong(this.modify_time);
        dest.writeString(this.create_time);
        dest.writeString(this.city);
        dest.writeString(this.address);
        dest.writeString(this.title);
        dest.writeInt(this.coord_type);
        dest.writeString(this.links);
        dest.writeString(this.direction);
        dest.writeInt(this.type);
        dest.writeDouble(this.distance);
        dest.writeDouble(this.weight);
        dest.writeDoubleArray(this.location);
    }

    protected HotPoint(Parcel in) {
        this.tags = in.readString();
        this.uid = in.readLong();
        this.province = in.readString();
        this.geotable_id = in.readLong();
        this.district = in.readString();
        this.modify_time = in.readLong();
        this.create_time = in.readString();
        this.city = in.readString();
        this.address = in.readString();
        this.title = in.readString();
        this.coord_type = in.readInt();
        this.links = in.readString();
        this.direction = in.readString();
        this.type = in.readInt();
        this.distance = in.readDouble();
        this.weight = in.readDouble();
        this.location = in.createDoubleArray();
    }

    public static final Creator<HotPoint> CREATOR = new Creator<HotPoint>() {
        public HotPoint createFromParcel(Parcel source) {
            return new HotPoint(source);
        }

        public HotPoint[] newArray(int size) {
            return new HotPoint[size];
        }
    };
}
